package dao

type ErrCode struct {
	Code    int
	Message string
}

var (
	ERR_NONE ErrCode = ErrCode{Code: 0, Message: "Success"}
	//login
	ERR_NO_LOGIN ErrCode = ErrCode{Code: -200, Message: "未登录"}
	//posts
	ERR_POST_ID            ErrCode = ErrCode{Code: -301, Message: "ID错误"}
	ERR_POST_NOT_FIND      ErrCode = ErrCode{Code: -302, Message: "文章未找到"}
	ERR_POST_TITLE_ERROR   ErrCode = ErrCode{Code: -303, Message: "标题错误"}
	ERR_POST_CONTENT_ERROR ErrCode = ErrCode{Code: -304, Message: "内容错误"}
	ERR_POST_SAVE_ERROR    ErrCode = ErrCode{Code: -305, Message: "保存失败"}
	//post_type
	ERR_POST_TYPE_NOT_FIND   ErrCode = ErrCode{Code: -401, Message: "分类信息未找到"}
	ERR_POSTTYPE_ERROR       ErrCode = ErrCode{Code: -402, Message: "分类错误"}
	ERR_POST_TYPE_FID_ERROR  ErrCode = ErrCode{Code: -403, Message: "分类ID错误"}
	ERR_POST_TYPE_NAME_ERROR ErrCode = ErrCode{Code: -404, Message: "分类名称错误"}
	ERR_POST_TYPE_ADD_ERROR  ErrCode = ErrCode{Code: -405, Message: "分类信息添加失败"}
	ERR_POST_TYPE_UPDATE     ErrCode = ErrCode{Code: -406, Message: "分类信息更新失败"}
	//link
	ERR_GET_LINK_DATA   ErrCode = ErrCode{Code: -601, Message: "数据获取失败"}
	ERR_CHECK_LINK_DATA ErrCode = ErrCode{Code: -602, Message: "数据校验失败"}
	ERR_ADD_LINK_DATA   ErrCode = ErrCode{Code: -603, Message: "数据添加失败"}
)
